﻿using EntityModel;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace API.Controllers
{
    /// <summary>
    /// 职工信息表控制器
    /// </summary>
    [Route("api/[controller]")]
    [ApiController]
    public class EmployeeController : ControllerBase
    {
        private readonly ApiDbContext db;
        public EmployeeController(ApiDbContext context)
        {
            db = context;
        }
        /// <summary>
        /// 查询所有人员接口
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public List<Employee> GetAll()
        {
            return db.Employee.ToList();
        }

        
    }
}
